Comments (9)
Hi @CavalloScuro thanks for reaching out, trying the app and giving feedbacks about possible improvements.
In your case urls without an extension brings a problem on saving to filesystem (with which filename and extension to save) but I think it can be handled with the server response header (via parsing the mime type)
Can you supply a small set of image resources without file extensions to make the testing easier?
Kind regards
from excel-parser-processor.
Dear Burak,
Thank you for responding so quickly and so kindly to my inquiry. As I mentioned, I'm really impressed with your tool, which will be an enormous (invaluable, really) resource for my research.
The URLs that I am dealing with right now look like this:
http://digitale.bnc.roma.sbn.it/tecadigitale/img/giornale/TO00181645/1935/unico/00000001/original
http://digitale.bnc.roma.sbn.it/tecadigitale/img/giornale/TO00181645/1935/unico/00000002/original
http://digitale.bnc.roma.sbn.it/tecadigitale/img/giornale/TO00181645/1935/unico/00000003/original
http://digitale.bnc.roma.sbn.it/tecadigitale/img/giornale/TO00181645/1935/unico/00000004/original
http://digitale.bnc.roma.sbn.it/tecadigitale/img/giornale/TO00181645/1935/unico/00000005/original
There is no way, that I know of, to get an absolute path to the jpg itself; I have only been able to find these URLs which are essentially HTML websites with the .jpg embedded inside of them. But when one performs the Save As function, it saves the file as a .jpg (at least in my browser). The problem, of course, is automation!
I thank you for being willing to look into this solution. It means a lot. And thanks for your hard work.
CS
from excel-parser-processor.
I just had an idea: I wonder if I could just put the .jpg extensions in the "FileName" column of the spreadsheet, which would then become the full file name when the Parser assigns the extensionless file a file name. Am I off here, or could this be a possible solution?
from excel-parser-processor.
Yeah that could work of course;
But that could require some extra work to prepare the excel file in cases where you can not guess the extension or if the resource changes from png to jpg on the server, or if they serve the image with an image CDN they can check your request headers and send webP, avif or any other modern extension due to your headers( in this case embedded chromiums user agent), so the most convenient way seems to rely on the server response's mime type and save with that extension on the filesystem.
This task won't take a long time, I guess next week I'll have some spare time to work on 👨💻
from excel-parser-processor.
I thank you so much, Burak! Very kind!
from excel-parser-processor.
Hi @CavalloScuro ,
I looked for the mimeType solution but we have missed some other problem,
every file ends with the name original so when the job is completed you only have one file and its the last one on the excel file since it always over writes the last file with the same name :)
so I guess you should also have a column B (which is currently supported, it can contain an extension or not in your case).
for example;
| | A | B | C |
| ---| :---------------------------------------------| :------------| :-------------------------|
| 1 | http://.................../00000001/original | optional1 | optional-sub-folder-name |
| 2 | http://.................../00000002/original | optional2 | optional-sub-folder-name |
| 3 | http://.................../00000003/original | optional3.png| |
| . | ... | | |
| . | ... | | |
so if the column B contains an extension that will be used, but if not mimeType from the response will be used, does that sound good to you ?
from excel-parser-processor.
Dear Burak,
Thank you very much for taking the time to look into this and making these adjustments to your code. I really appreciate it. I'll give it a go right now and report back later.
Many thanks again.
CS
from excel-parser-processor.
By the way the new code is not usable right now, there will be a new release and in the update notes we will have this kind of story for extension free file urls.
Kind regards
from excel-parser-processor.
updates are handle in the pull request #54 and merged to master 👍🏼
from excel-parser-processor.
Related Issues (20)
- show the ongoing progress on the client side HOT 1
- npm run build script fails on Windows platform
- absent documentation HOT 3
- JavaScript Linter should be added to keep code styling consistent.
- Contributing guideline should be created
- exception empty excel HOT 5
- create CONTRIBUTING.md HOT 1
- bugsnag or some similar error tracking mechanism should be added
- add Issue templates
- add Pull request template HOT 1
- Add codetriage badge to readme file
- add analytics support to track usage and such statistics
- Rename from next coloumn function is needed HOT 1
- Brew implementation HOT 1
- a javascript error occured in the main process HOT 15
- Workaround for sites banning ip? HOT 2
- Nothing happens after file select HOT 7
- How to login to Azure AD ? HOT 4
- In-app Navigation and Electron.js Version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excel-parser-processor.