Search found 85 matches
by awasu.user
Thu Jul 27, 2017 12:07 pm
Forum: Awasu - General Discussion
Topic: How get API unread articles from channel as JSON
Replies: 6
Views: 1121

Re: How get API unread articles from channel as JSON

I fix what I can and full tempate is: {%REPEAT% Channels-IfGroupingItems insert=","}{%?GROUP-ITEMS-BY-CHANNEL%}{"{%CHANNEL-METADATA% name}":[ {%REPEAT% FeedItems insert=","}{ "id": "{%ITEM-METADATA% AwasuId}", "title": "{%ITEM-METADATA% name!}", "published": "{%ITEM-METADATA% timestamp}", "url": "{%...
by awasu.user
Thu Jul 27, 2017 8:14 am
Forum: Awasu - General Discussion
Topic: How get API unread articles from channel as JSON
Replies: 6
Views: 1121

Re: How get API unread articles from channel as JSON

I try modified template: {%REPEAT% Channels-IfGroupingItems insert=","}{%?GROUP-ITEMS-BY-CHANNEL%}{{%CHANNEL-METADATA% name}:[ {%REPEAT% FeedItems insert=","}{ "id": "{%ITEM-METADATA AwasuId%}", "title": {%ITEM-METADATA% name!}, "published": {%ITEM-METADATA% timestamp}, "url": "{%ITEM-METADATA% url ...
by awasu.user
Wed Jul 26, 2017 8:18 pm
Forum: Awasu - General Discussion
Topic: How get API unread articles from channel as JSON
Replies: 6
Views: 1121

How get API unread articles from channel as JSON

How use API to get unread articles from channel as JSON? I remove my previous code, but I try something like that: {%REPEAT% Channels-IfGroupingItems} {%?GROUP-ITEMS-BY-CHANNEL%} { "{%CHANNEL-METADATA% name}": { {%REPEAT% FeedItems} "{%id%}": { "title": "{%ITEM-METADATA% name!}", "published": "{%ITE...
by awasu.user
Tue Jul 25, 2017 11:05 am
Forum: Awasu - Feature Requests
Topic: Return channel as JSON and XML
Replies: 5
Views: 1092

Re: Return channel as JSON and XML

Because Awasu has been written over a period of many years, and things that might make sense now maybe didn't back then The idea was always to let information be extracted out of Awasu based on content, not on structure e.g. "what stories are there about subject X within the past 3 days?", not "giv...
by awasu.user
Sat Jul 22, 2017 4:31 pm
Forum: Awasu - Feature Requests
Topic: Return channel as JSON and XML
Replies: 5
Views: 1092

Re: Return channel as JSON and XML

From beginning I start with definition: Channel pack - few channels on the same name fx. "culture", "politics". I want by one API call get unread articles from channel pack fx. "culture". I need URL , title , publishing date and Channel Name . General idea is use more RAM than Hard disk to this oper...
by awasu.user
Sat Jul 22, 2017 12:46 pm
Forum: Awasu - Feature Requests
Topic: Return channel as JSON and XML
Replies: 5
Views: 1092

Return channel as JSON and XML

Intro To get all articles in channels I use API call in format: http://localhost:2604/channels/get?format=json&token=xxx&id=100 Result: HTML file and making processing data. Workaround Set report template with structure and check processing by grouping in Awasu: title;url;published;channelname{%REP...
by awasu.user
Fri Jul 21, 2017 5:28 am
Forum: Awasu - Extensions
Topic: How get channel lis in specific report?
Replies: 2
Views: 497

How get channel lis in specific report?

Introduction Fx. I create folder NEWS and subfolders Europe , Asia , North America . Next I create reports: All News - I get report from all folders in main folder NEWS (with CNN channel within) and subfolders Europe, Asia, North America Europe News - I get report from Europe News - BBC Asia News -...
by awasu.user
Thu Jul 13, 2017 8:11 pm
Forum: Awasu - Extensions
Topic: How to use the API to check if an item has been read
Replies: 3
Views: 562

How to use the API to check if an item has been read

I try get JSON data from Awasu with code: phrase = "Donald Trump" import requests print("Check in Awasu: ", phrase) a_search = "http://localhost:2604/search/query" opt = {} opt["token"] = "GYmh3B" opt["age"] = "1" opt["p"] = "1" opt["ps"] = "20" opt["l"] = "title,content" opt["format"] = "json" opt[...
by awasu.user
Sat Jul 08, 2017 11:55 am
Forum: Awasu - General Discussion
Topic: [Plugin] How add, use, modified report HTML file
Replies: 14
Views: 4199

Re: [Plugin] How add, use, modified report HTML file

Allright. I try another aproach - get JSON data from start - to save time needed to parsing HTML. I will do as you sugest. Thank you!
by awasu.user
Sat Jul 08, 2017 11:17 am
Forum: Awasu - General Discussion
Topic: [Plugin] How add, use, modified report HTML file
Replies: 14
Views: 4199

Re: [Plugin] How add, use, modified report HTML file

My final purpose is get from Awasu informations: channel name fx. BBC article title fx. "London is awaking" article url fx "http://www.bbc.co.uk/blabla" published date fx "2017-07-08". Using $/channels/get generates HTML output. I would JSON in out so I put in URL "/channels/get ?format=json &", but...
by awasu.user
Sat Jul 08, 2017 10:06 am
Forum: Awasu - General Discussion
Topic: [Plugin] How add, use, modified report HTML file
Replies: 14
Views: 4199

Re: [Plugin] How add, use, modified report HTML file

Thank you for all your words! I try extend my coding with calling API. Before that I make template: { "articles": { {%REPEAT% Channels-IfGroupingItems} {%?GROUP-ITEMS-BY-CHANNEL%} "{%CHANNEL-METADATA% name}": [ {%ENDIF%} {%REPEAT% FeedItems} { "url":"{%ITEM-METADATA% url encode=attr}", "headline":"{...
by awasu.user
Mon Jun 26, 2017 8:10 am
Forum: Awasu - General Discussion
Topic: [Plugin] How add, use, modified report HTML file
Replies: 14
Views: 4199

Re: [Plugin] How add, use, modified report HTML file

It's working! After days of tries I get basic skeleton. import nltk from nltk import word_tokenize from nltk.util import ngrams import re from tqdm import * #progress bars https://github.com/noamraph/tqdm from bs4 import BeautifulSoup class Awasu: class io_data: def open(): a_report_file = 'awasu-te...
by awasu.user
Sat Jun 24, 2017 9:54 pm
Forum: Awasu - General Discussion
Topic: [Plugin] How add, use, modified report HTML file
Replies: 14
Views: 4199

Re: [Plugin] How add, use, modified report HTML file

I'm not an expert on Unicode, but the ftfy (fixes text for you) library may help. I tried it ftfy.fix_encoding() before and was not working for me. Bug is placed when I read file or where I save it. Using pass I can pass error, but is lost one feed. I'm still learning Python :oops: So I start with ...

Go to advanced search