Do you like getting an overview of news? Do you prefer timelines? With personalNews you'll get your news-sources presented as a timeline to get a quick overview of whats currently happening. It's like twitter, but for news!
Make sure your server supports php - this is the only requirement. If feeds didn't get fetched, try to modify your php.ini and allow allow_url_fopen allow_url_fopen = true. Some providers only require to tick a checkbox allow_url_fopen in the backoffice to allow this functionality.
For local development the php-files are served through vagrant. They reside next to the index.html (used for react) in the folder /htdocs. You could just remove the index-file and put everything in there on your server and you're done.
Since there is also an api available, you can also run npm run build. After that you'll find the folder /build. Put this on your server if you want the react-frontend too.
Of course you could create your own client and just use the api.
I build this primarily to use it in a webpanel in vivaldi. But I really like to use this app on mobile too. It gives me a quick overview of whats currently happening. I really hope you enjoy this little tool as much as I do. :)
https://demo.saschadiercks.de/personalnews/
personalNews comes with a default list of links and some example keywords for blacklisting, to show you how it works. It contains a list of popular news-sites and some development-ressources. You can change that. Just head over to '/htdocs/data/*' and play with that files. It's quite self explanatory.
- easy to configure via json
- only requires php on your server
- uses vanillaJS (to minimize file-size)
- API for fetching content (get only for now)
- allows hiding the UI via url-parameter (mode=minimal)
- toggle descriptions
allow theming(done)allow blacklisting of news(done)- grouping of related news
multiple timelines(done)- allow onsite-editing so you don't have to fiddle with the json-file
The api is called via /api/v1/ and the output can be controlled via url-parameters. This is great for building your own frontend or embed the news in your website or project.
The output is returned as a json
- meta
- state: error || warning || info || ok
- message: null || string (with additional info)
- itemCounts
- totalItems: number (of items returned)
- newItems: number (of items from timestamp given to the api)
- pinnedMessage: null || string (configure in
htdocs/data/meta.json)
- content: array (of items to be displayed)
- channels: array (of configured channels see
htdocs/data/feeds.json)
Input for filtering the output. Uses url-parameters
channel=someChannel
Return items from the selected channel. This uses the channels-object configured in htdocs/data/feeds.json. If the channel given to the api doesn't exist or none channel is given to it, it returns the content of the first channel from htdocs/data/feeds.json.
timestamp=some timestamp
Using a timestamp the api will return the number of new items after that given timestamp. If no timestamp is set, the api will return the number of totalItems as newItems. The number of totalItems is always returned as a sperate value.
maxitemcount=number
The number of items in the timeline can be reduced by passing in maxitemcount. If maxitemcount is a number higher than zero, this number is used to determine the number of items in the feed. If a string or 0 is passed, all items in the feed will be returned. The meta-values totalItemsand newItem will adept too. maxitemcountis useful if you're building a project that uses this api and you only want to display a maximal amount of items.
maxtextlength=number
The rough textlength of the summary of the article in the timeline. Rough? The api searches for a "." in the summary near the entered number, which represents the rough amount of characters for the rendered summary. So, if you only want to render the first sentence of a summary, you should use low values like maxtextlength=1. maxtextlength=0 is equal to not using the parameter at all - resulting in unshortened summaries.
In the attached example page, I'm using a maxtextlength=400.
- install docker on your machine (https://docs.docker.com/get-docker/)
- head to the local repository and run
docker-compose up - Wait a while until all components are loaded an the box is running. (The first start can take a while)
- visit (http://127.0.0.1:8080/)
- install vagrant on your machine (https://www.vagrantup.com/)
- install Virtualbox (https://www.virtualbox.org/wiki/Downloads)
- head to your local repository an enter
vagrant up - Wait a while until all components are loaded an the box is running. (The first start can take a while)
- visit (http://127.0.0.1:8080/)
- Make sure, you have node.js installed on your computer (https://nodejs.org/en/)
- run
npm install gulp-cli -gto install gulp - run
npm installto install gulp in your project - run
gulp sass:watchto compile SASS on the fly
- Screenshots on this page made with http://magicmockups.com/
