* [gentoo-commits] repo/proj/guru:dev commit in: www-apps/nitter/files/, www-apps/nitter/
@ 2022-07-05 20:09 Anna Vyalkova
0 siblings, 0 replies; only message in thread
From: Anna Vyalkova @ 2022-07-05 20:09 UTC (permalink / raw
To: gentoo-commits
commit: e1f7a22751c25fca201b13733c26810c10c31947
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jul 4 04:44:31 2022 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Jul 5 20:08:57 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e1f7a227
www-apps/nitter: new package, add 0.1.0_p20220624
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
www-apps/nitter/Manifest | 1 +
www-apps/nitter/files/nitter.conf.example | 48 ++++++++++++++++++++
www-apps/nitter/files/nitter.initd | 30 +++++++++++++
www-apps/nitter/files/nitter.service | 12 +++++
www-apps/nitter/nitter-0.1.0_p20220624.ebuild | 64 +++++++++++++++++++++++++++
5 files changed, 155 insertions(+)
diff --git a/www-apps/nitter/Manifest b/www-apps/nitter/Manifest
new file mode 100644
index 000000000..cf6b2ddce
--- /dev/null
+++ b/www-apps/nitter/Manifest
@@ -0,0 +1 @@
+DIST nitter-0.1.0_p20220624.tar.gz 1177509 BLAKE2B 6aecaea8f0abd9d2568ddda6bb8e39f7fa92dedd1250622333fc8d61927501a40ecec5631484e4bb36e917c5bb51624055587e27e7bb5c367afaffcedf626320 SHA512 1b4dcdb06b0a8850fbc3e1a4ae8df9c35511e34dd41acf7e3c0e41943407ef7d21f2856b2996a7db73f8692f35acb481d4778b93996dfb7c494500032631e0f7
diff --git a/www-apps/nitter/files/nitter.conf.example b/www-apps/nitter/files/nitter.conf.example
new file mode 100644
index 000000000..277f55773
--- /dev/null
+++ b/www-apps/nitter/files/nitter.conf.example
@@ -0,0 +1,48 @@
+# This is an example. Copy this file to /etc/nitter/nitter.conf and edit to
+# match your preferences.
+
+[Server]
+address = "0.0.0.0"
+port = 8080
+https = false # disable to enable cookies when not using https
+httpMaxConnections = 100
+staticDir = "/usr/share/nitter/public"
+title = "nitter"
+hostname = "nitter.net"
+
+[Cache]
+listMinutes = 240 # how long to cache list info (not the tweets, so keep it high)
+rssMinutes = 10 # how long to cache rss queries
+redisHost = "localhost" # Change to "nitter-redis" if using docker-compose
+redisPort = 6379
+redisPassword = ""
+redisConnections = 20 # connection pool size
+redisMaxConnections = 30
+# max, new connections are opened when none are available, but if the pool size
+# goes above this, they're closed when released. don't worry about this unless
+# you receive tons of requests per second
+
+[Config]
+hmacKey = "secretkey" # random key for cryptographic signing of video urls
+base64Media = false # use base64 encoding for proxied media urls
+enableRSS = true # set this to false to disable RSS feeds
+enableDebug = false # enable request logs and debug endpoints
+proxy = "" # http/https url, SOCKS proxies are not supported
+proxyAuth = ""
+tokenCount = 10
+# minimum amount of usable tokens. tokens are used to authorize API requests,
+# but they expire after ~1 hour, and have a limit of 187 requests.
+# the limit gets reset every 15 minutes, and the pool is filled up so there's
+# always at least $tokenCount usable tokens. again, only increase this if
+# you receive major bursts all the time
+
+# Change default preferences here, see src/prefs_impl.nim for a complete list
+[Preferences]
+theme = "Nitter"
+replaceTwitter = "nitter.net"
+replaceYouTube = "piped.kavin.rocks"
+replaceReddit = "teddit.net"
+replaceInstagram = "bibliogram.art"
+proxyVideos = true
+hlsPlayback = false
+infiniteScroll = false
diff --git a/www-apps/nitter/files/nitter.initd b/www-apps/nitter/files/nitter.initd
new file mode 100644
index 000000000..1d26ed1cf
--- /dev/null
+++ b/www-apps/nitter/files/nitter.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${NITTER_CONF_FILE:="/etc/nitter/${RC_SVCNAME}.conf"}
+export NITTER_CONF_FILE
+
+command="/usr/bin/nitter"
+command_background=yes
+command_user="nitter:nitter"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+logpath="/var/log/nitter"
+output_log="${logpath}/${RC_SVCNAME}.log"
+error_log="${output_log}"
+
+depend() {
+ need redis
+ use net
+}
+
+start_pre() {
+ checkpath -do "${command_user}" "${logpath}"
+ checkpath -fo "${command_user}" "${output_log}"
+
+ if [ ! -f "${NITTER_CONF_FILE}" ]; then
+ eerror "Configuration file '${NITTER_CONF_FILE}' not found"
+ return 1
+ fi
+}
diff --git a/www-apps/nitter/files/nitter.service b/www-apps/nitter/files/nitter.service
new file mode 100644
index 000000000..443fecd49
--- /dev/null
+++ b/www-apps/nitter/files/nitter.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Nitter
+After=network.service
+Requires=redis.service
+
+[Service]
+User=nitter
+Environment="NITTER_CONF_FILE=/etc/nitter/nitter.conf"
+ExecStart=/usr/bin/nitter
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-apps/nitter/nitter-0.1.0_p20220624.ebuild b/www-apps/nitter/nitter-0.1.0_p20220624.ebuild
new file mode 100644
index 000000000..acb82fc3c
--- /dev/null
+++ b/www-apps/nitter/nitter-0.1.0_p20220624.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit nimble systemd
+
+COMMIT="81ec41328d5684dd395f584254d723abee213ac0"
+DESCRIPTION="An alternative front-end for Twitter"
+HOMEPAGE="https://github.com/zedeus/nitter"
+SRC_URI="https://github.com/zedeus/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="test"
+PROPERTIES="test_network"
+
+RDEPEND="
+ acct-user/nitter
+ dev-db/redis
+ dev-nim/flatty
+ dev-nim/jester
+ dev-nim/jsony
+ dev-nim/karax
+ dev-nim/nimcrypto
+ dev-nim/packedjson
+ dev-nim/redpool
+ dev-nim/supersnappy
+ dev-nim/zedeus_redis
+ dev-nim/zippy
+"
+DEPEND="
+ dev-nim/markdown
+ dev-nim/sass
+"
+
+src_configure() {
+ nimble_src_configure
+
+ # Error: unhandled exception: cannot open: public/lp.svg
+ ln -s "${S}"/public ${BUILD_DIR}/public || die
+}
+
+src_compile() {
+ nimble_src_compile
+ enim r tools/gencss
+ enim r tools/rendermd
+}
+
+src_install() {
+ nimble_src_install
+
+ newinitd "${FILESDIR}"/nitter.initd ${PN}
+ systemd_dounit "${FILESDIR}"/nitter.service
+
+ insinto /etc/nitter
+ doins "${FILESDIR}"/nitter.conf.example
+
+ insinto /usr/share/nitter
+ doins -r public
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-05 20:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-05 20:09 [gentoo-commits] repo/proj/guru:dev commit in: www-apps/nitter/files/, www-apps/nitter/ Anna Vyalkova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox