Displaying less columns in serve-index node module - node.js

I'm currently working on a project that requires me to display a folder full of files form the inside of a server. I'm using the serve-index npm module to do so (https://www.npmjs.com/package/serve-index).
My issue is that the file names I'm using are too long. Serve-index displays 3 columns at a time so it's hard to read the entire file name at a glance. Is there a way to display either 1 or 2 columns?

Like Molda said, it was all css based. All I need was to specify a custom css file in express like the following.
app.use('/text_files', serveIndex(__dirname + '/text_files', {'stylesheet':'./styles/directories.css'}));

Related

How to add dyamic assets in PKG

I'm trying to package an application which essentially takes a screenshot webpages using puppeteer which then stores it in a folder called report. However since the number of images changes vary I am unable to define this in the asset property of pkg. How do I go about this?
I've added an image of my package.json and the actual error
*Edit:
I've tried to use
report/*.* || report/*.png
but to no avail

Accessing all the files from a folder

I'm trying to access all the files from a certain folder so that I can get their path and put it into an array. Once I get this array, I'd like to use it in a react file and display its contents on a page. I had a general idea of looping through the folder but couldn't find a solution to my problem. Is there a way to do this, directly or maybe through a third-party package?

shell script to check if images in a folder are being used by a set of HTML files

Sometime ago I worked in a team that developed a bunch of educational softwares and now they are been reviewed for bugs and updates.
During this process, I noticed that the folder "imgs" accumulated too many files. Probably one of the developers decided to include all the images used by each of the softwares into the folder. However, because there are too many softwares, it would be too painful to check manually all of them (and some of the images are part of the layout, almost invisible).
Is there a way to write a shell script in Linux to check if the files in a given folder are being used by a set of HTML and JS files in another folder?
Go to the images folder and try this
for name in *; { grep -ril $name /path/to/soft/* || echo "$name not used"; }
Im not sure I understood your question correctly,
But maybe this will help you
ls -1 your_source_path | while read file
do
grep -wnr "$file*" your_destination_path ||
echo "no matching for file $file"
# you can set any extra action here
done
in source_path you put director from hi will list all files name and destination where he should searching.
It is not possible to check for the generic case - since HTML and Javascript are two dynamic (e.g. the Javascript code could create the image file name on the file). Likewise, images can be specified in CSS style sheet, inline style, etc.
You want to review the HTML/JS files, and see if possible to identify the tags that are actually used to specify images. This will hopefully, reduce the number of XML tags and attribute names that need to be extracted.
As an alternative, if you have access to the 'access log' of the server, you can find out which images have been accessed over time, and focus the search on images not referenced in the log file.

Can you remove NetSuite Bundles after installation

I am working on a NetSuite instance that had custom(contractor/SuiteScript) work installed via a bundle, but it is not a third party product but made for this system. Now there are 2 listings in the dropdown for each file. In other words, if I am adding a file as a library, it shows up twice and I don't know which reference is the correct one to choose. I used search to find the duplicate file name is in the bundle install. Can I safely remove or delete the bundle? thanks any help is appreciated.
You cannot typically remove individual files from a bundle. If you do not need the functionality of the bundle anymore than you can remove it at your discretion by going to Customization>SuiteBundler>Search & Install Bundles>List, then under the action icon click 'Uninstall'.
I wouldn't try to delete a script library from a bundle folder. Even if you are uploading an identical library there may be references in the bundle scripts to the original library that will be broken when if you delete it.
If you are wondering which one you are selecting from the drop down one thing you could do is figure out the internal id of your library file then run a search on your script file that pulls in the library file id's and make sure that they match.

EmberJS in combination with Ember-Runner

Good day,
I just started with EmberJS in combination with Ember-Runner. I found an working example on Github.
Ember-runner automaticly adds all your template files and JS (at least that is what I thought) together and generarates a singe HTML / JS / templates / CSS file from your own files every time you save. (And optionally minify's and such). A build tool, just like it says in the description.
This is what it does for the CSS and templates part, however for the JS part it only seems to include only one file in my JS folder which is called 'main.js'. Is it possible to scan that dir for other files so it includes those as well? (So I can have separate controller / model files and such).
I hope my question is clear.
Kind regards,
Matthijn Dijkstra

Resources