croqaz / clean-mark

Convert an article into clean text
MIT License
600 stars 51 forks source link

Feature Request: Automatically name md-file after headline #3

Closed spinnaker1 closed 5 years ago

spinnaker1 commented 5 years ago

I have to download many articles with url formats like https://www.example.com/827209.

Is it possible to integrate a flag (--name-headline) to name the md output file after the headline of the article, instead of the url?

croqaz commented 5 years ago

Hi ! Thanks for taking the time to write this issue. Sounds like a good idea, I can see the use-case. I would call it name-title because the field is called "title".

Feel free to write the code yourseld if you want :) It should be pretty easy to do in /bin/clean-mark. If not, I will to do this in the next days.

spinnaker1 commented 5 years ago

Please you write the code, because I have no clue how to do this.

croqaz commented 5 years ago

Hi @spinnaker1 ! I just published version 0.8 on NPM and it should do exactly what you wanted. The option is called --name-title. Please check and close this issue if your problem is solved.

PS: I noticed that there are some problems in the core of clean-mark, with some websites... Unfortunately this is the best that this tool will do...