Refining dependencies.

This commit is contained in:
ruidajo 2022-06-22 16:47:44 -05:00
parent 485572a81e
commit fa694f99a7
7 changed files with 15 additions and 50 deletions

View File

@ -5,14 +5,13 @@ baseline: spec
for: #common
do: [
"Dependencies"
"self rssTools: spec." "<-- We need to fix the XMLWriter dependency."
self xmlParserHTML: spec.
self reStore: spec.
"self roassal3Exporters: spec."
self mustache: spec.
"self tiddlyWikiPharo: spec."
self tiddlyWikiPharo: spec.
"Packages"
spec
package: 'Socialmetrica'
with: [ spec requires: #("'RSSTools'" 'XMLParserHTML' 'ReStore' "'Roassal3Exporters'" 'Mustache' "'TiddlyWikiPharo'") ]
with: [ spec requires: #('XMLParserHTML' 'ReStore' "'Roassal3Exporters'" 'Mustache' 'TiddlyWikiPharo') ]
]

View File

@ -1,11 +0,0 @@
baselines
rssTools: spec
Metacello new
repository: 'github://brackendev/RSSTools-Pharo/src';
baseline: 'RSSTools';
onConflict: [ :ex | ex useLoaded ];
"onUpgrade: [ :ex | ex useLoaded ];
onDowngrade: [ :ex | ex useLoaded ];"
onWarningLog;
load.
spec baseline: 'RSSTools' with: [ spec repository: 'github://brackendev/RSSTools-Pharo/src']

View File

@ -1,7 +1,8 @@
baselines
tiddlyWikiPharo: spec
ExoRepo new
repository: 'https://code.tupale.co/Offray/TiddlyWikiPharo';
load.
spec baseline: 'TiddlyWikiPharo'
| repo |
repo := ExoRepo new
repository: 'https://code.tupale.co/Offray/TiddlyWikiPharo'.
repo load.
spec baseline: 'TiddlyWikiPharo' with: [ spec repository: 'gitlocal://', repo local fullName ]

View File

@ -1,22 +0,0 @@
accessing
getRemoteMessagesFromRss
| customQuery lastTweetsRaw lastTweets |
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
lastTweets := TweetsCollection new.
customQuery := Dictionary new
at: 'parameters' put: self userNameLink;
at: 'date' put: DateAndTime now;
yourself.
lastTweets query: customQuery.
lastTweetsRaw doWithIndex: [ :rssTweet :i |
| current previous |
current := Tweet new fromNitterRssItem: rssTweet.
i < lastTweetsRaw size ifTrue: [
previous := Tweet new fromNitterRssItem: (lastTweetsRaw at: i + 1).
current timelines
at: self userName put: previous id;
yourself ].
current queries add: customQuery.
lastTweets add: current ].
self messages: lastTweets

View File

@ -1,3 +1,6 @@
accessing
name
^ name ifNil: [ name := ((self rssFeed requiredItems title) splitOn: '/') first ]
| documentTree |
documentTree := [ self documentTree ] onErrorDo: [ ^ nil ].
^ name ifNil: [ name := (documentTree xpath: '//div[@class="profile-card-tabs-name"]//a[@class="profile-card-fullname"]') stringValue ]

View File

@ -1,7 +1,6 @@
accessing
profileImageUrl
| userFeed |
^ profileImageUrl ifNil: [
userFeed := self rssFeed xmlDocument.
(userFeed xpath: '//div[@class="error-panel"]') size = 1 ifTrue: [ ^ nil].
profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') ]
| documentTree |
documentTree := [ self documentTree ] onErrorDo: [ ^ nil ].
^ self class nitterProvider, (((documentTree xpath: '//div[@class="profile-card-info"]//a[@class="profile-card-avatar"]') @ 'href') stringValue copyReplaceAll: '%2F' with: '/') copyWithoutFirst

View File

@ -1,4 +0,0 @@
accessing
rssFeed
^ RSSTools createRSSFeedFor: self userNameLink , '/rss'