Upload Image Files in Bulk?

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Upload Image Files in Bulk?

Post by wandererfan »

Is it possible to upload more than 1 image file at a time? a script maybe?

I have to load all the TechDraw icons at some point and the only way I know to upload a file is Tools>Upload a file.

wf
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Upload Image Files in Bulk?

Post by renatorivo »

uploaded into artwork
Renato
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Upload Image Files in Bulk?

Post by wandererfan »

renatorivo wrote:uploaded into artwork
Renato
Sorry, not enough coffee yet, not following you. Don't see any extra upload function in Artwork page.

I know how to add an image to a page once the image is uploaded to the Wiki ([[Image:myIcon.svg]], but I'm trying to avoid doing 1 upload per icon.

wf
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Upload Image Files in Bulk?

Post by sgrogan »

wandererfan wrote:Sorry, not enough coffee yet, not following you. Don't see any extra upload function in Artwork page.
renatorivo has already uploaded the icons to the artwork page in a new Tech Draw Section.
"fight the good fight"
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Upload Image Files in Bulk?

Post by renatorivo »

the files are here:
http://www.freecadweb.org/wiki/index.ph ... chDraw_WB:

soon the .png files, for command pages

sorry, no idea on how to upload all the files at once.

Renato
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Upload Image Files in Bulk?

Post by wandererfan »

renatorivo wrote:the files are here:
http://www.freecadweb.org/wiki/index.ph ... chDraw_WB:
:oops: Doh! Thanks!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Upload Image Files in Bulk?

Post by NormandC »

It looks like an extension would be required to upload files in bulk.

https://www.mediawiki.org/wiki/Category:Bulk_upload

Or there seems to be a python script: https://www.mediawiki.org/wiki/Manual:P ... /upload.py
catman
Posts: 412
Joined: Fri Jan 11, 2019 10:42 pm

Re: Upload Image Files in Bulk?

Post by catman »

NormandC wrote: Fri Apr 29, 2016 3:01 am It looks like an extension would be required to upload files in bulk.

https://www.mediawiki.org/wiki/Category:Bulk_upload
Why aren't you using the extension Mediawiki:MsUpload ?
It as close as you get to image drag & doop. It will do bulks.

Documenting a workbench with all these little button images is a nightmare without extensions like that. Try it out you will see what I mean.
We are running MediaWiki 1.27.1 and MsUpload 10.0 with no problems. Its the most loved extension by the users.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Upload Image Files in Bulk?

Post by vocx »

renatorivo wrote: Thu Apr 28, 2016 4:39 pm the files are here:
http://www.freecadweb.org/wiki/index.ph ... chDraw_WB:

soon the .png files, for command pages

sorry, no idea on how to upload all the files at once.

Renato
I just saw this old thread, but I will mention this here in case anybody finds this information in the future.

All icon images in the wiki should be SVG files, and not PNG.

SVG files are vector images and can be scaled to any size without loss of detail; basically, they will always look good. On the other hand PNG images are bitmaps; they will look good depending on the initial resolution with which they where created. SVG files should be used for icons, diagrams, and other graphics that are simple. PNGs should be used for direct pictures taken with a camera, or images of your own screen (screenshots).

The Template:GuiCommand handles insertion of icons in SVG or PNG formats.

Code: Select all

{{#if:{{{Empty|}}}||
    {{#if:{{{Icon|}}}
        |[[Image:{{{Icon}}}|32px]]<span> </span>
        |{{#ifexist: Image:{{{Name}}}.svg
            |[[Image:{{{Name}}}.svg|32px]]<span> </span>
            |{{#ifexist: Image:{{{Name}}}.png
                |[[Image:{{{Name}}}.png|32px]]<span> </span>
                |[[Image:NoIconFound.png|32px|Official icon not found]]
If the option is Empty, it will display no icon; otherwise, it will use the value of Icon; otherwise it will try the value Name.svg; otherwise it will try the value Name.png; otherwise it will display NoIconFound.png.

So, in general, as of today, there is no need to have icons in PNG; icons in SVG is enough.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply