libertysoft3 / saidit Goto Github PK
View Code? Open in Web Editor NEWThe reddit open source fork powering SaidIt
Home Page: https://saidit.net
License: Other
The reddit open source fork powering SaidIt
Home Page: https://saidit.net
License: Other
Go to front page, scroll down to random button, follow link, address bar contains "https://saidit.net/${g.brander_community_abbr}/random
Is instance is used a lot in the codebase.
This suggests that some functions are pseudo-overloaded, or are otherwise being dishonest about what information they require. This is a maintenance nightmare! Can we clean this up?
If you could point me to where the docs are, I might be able to tidy it up a bit.
From copying the code from reddit it has left some dead links, I'll try find as many as I can and post them here. The format is Where I found the link - The link
Python 2.7 has until the end of the year before it stops receiving updates.
In order to achieve Python 3 compatibility, we'll also have to migrate several other technologies. The ideal approach is three-fold:
Here's a plan of attack:
b""
and u""
wherever possible and meaningful without breaking stuff. (e.g. site text and localisation strings are u""
, whereas a PNG is b""
).object
) everywhere.__future__
import statements in Python 2 for Python 3 (i.e. from __future__ import division, absolute_import, print_function, unicode_literals
) possible to every Python file (starting with the tests) without breaking things, making sure the meaning of the code is preserved while doing so. (This can be checked by observing the bytecode.)iterable.next()
with the six
module.six
from the codebase.six
as a dependency.u""
s and class NewStyle(object):
s.Useful resources:
Whether through ActivityPub or another protocol, federating the platform counts as a major step towards longevity or immutability. Ultimately transference to a serverless model such as integrating with IPFS or blockchain, might very well finalize anti-censorship security.
The syntax for a federated sub should go: /s/
+ sub + @
+ federated instance's domain.
For posterity I shall link two projects which should serve as examples:
I feel like it would be need if we had GFM.
var x = 5; // Colored Syntax + Fenced code blocks
Foo | Bar |
---|---|
Fancy | Tables! |
I don't know how hard it would be to add support for it. I'll close the issue if it's a total pain in the neck.
Hey there,
I can't install this on my server. Could you please update example.ini and annotate the custom settings you've added? I keep on getting errors when my config is read since your custom settings are missing
Wiki tab shouldn't be here: https://saidit.net/domain/imemc.org
Gilded tab shouldn't be here: https://saidit.net/s/friends/
In addition to choosing your home page sub, you can choose the default home page sort. Choose from: hot/new/insightful/fun/top/comments
Ref: https://saidit.net/s/SaidIt/comments/kbk/saiditnet_april_17_2019_html5_expandos_now/
This subscription management feature is buried off in preferences, people don't know it exists. Help smooth the auto-subscribe-all feature.
insightful and fun could be translated to aufschlussreich and spaßig.
Also "from (url)" could be translated to "via (url)".
Ref: https://saidit.net/s/SaidIt/comments/kbk/saiditnet_april_17_2019_html5_expandos_now/
Running the sample data installer
$ cd ~/src/reddit
$ reddit-run scripts/inject_test_data.py -c 'inject_test_data()'
is currently the only way you can have an admin user created, automoderator user created, the default_sr created, etc.
Fix is to create a slimmer version of inject_test_data()
called something like inject_default_data()
that just does the bare minimum, the first 9 lines. Then update the README installation instructions to say call one of these. Or split the function entirely and calling inject_test_data() after you have already called inject_default_data() is optional.
This is for production paths where people don't want a bunch of sample users and sample posts.
If it's subreddit related, it's probably a side effect of the configurable home page. Ensure DynamicSR has the full sticky properties of DefaultSR.
Jun 16 20:59:05 ubuntu reddit-paster: Error - <type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__'
Jun 16 20:59:05 ubuntu reddit-paster: URL: https://saidit.net/api/del
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/weberror/errormiddleware.py', line 162 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: app_iter = self.application(environ, sr_checker)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 229 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 287 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 244 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 259 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 380 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/config/middleware.py', line 406 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return self.app(environ, custom_start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/routes/middleware.py', line 136 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: response = self.app(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/wsgiapp.py', line 103 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: response = self.dispatch(controller, environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/wsgiapp.py', line 313 in dispatch
Jun 16 20:59:05 ubuntu reddit-paster: return controller(environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/lib/base.py', line 167 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: return WSGIController.__call__(self, environ, start_response)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/controllers/core.py', line 214 in __call__
Jun 16 20:59:05 ubuntu reddit-paster: response = self._dispatch_call()
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/controllers/core.py', line 164 in _dispatch_call
Jun 16 20:59:05 ubuntu reddit-paster: response = self._inspect_call(func)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/controllers/core.py', line 107 in _inspect_call
Jun 16 20:59:05 ubuntu reddit-paster: result = self._perform_call(func, args)
Jun 16 20:59:05 ubuntu reddit-paster: File '/usr/lib/python2.7/dist-packages/pylons/controllers/core.py', line 57 in _perform_call
Jun 16 20:59:05 ubuntu reddit-paster: return func(**args)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/lib/validator/validator.py', line 255 in newfn
Jun 16 20:59:05 ubuntu reddit-paster: simple_vals, param_vals, *a, **kw)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/lib/validator/validator.py', line 280 in noresponse
Jun 16 20:59:05 ubuntu reddit-paster: self_method(self, *a, **kw)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/controllers/api.py', line 1426 in POST_del
Jun 16 20:59:05 ubuntu reddit-paster: thing.subreddit_slow.remove_sticky(thing)
Jun 16 20:59:05 ubuntu reddit-paster: File '/home/reddit/src/reddit/r2/r2/models/subreddit.py', line 1456 in remove_sticky
Jun 16 20:59:05 ubuntu reddit-paster: sticky_fullnames = self.sticky_fullnames[:]
Jun 16 20:59:05 ubuntu reddit-paster: TypeError: 'NoneType' object has no attribute '__getitem__'
Jun 16 20:59:05 ubuntu reddit-paster:
Jun 16 20:59:05 ubuntu reddit-paster:
Jun 16 20:59:05 ubuntu reddit-paster: CGI Variables
Jun 16 20:59:05 ubuntu reddit-paster: -------------
Jun 16 20:59:05 ubuntu reddit-paster: CONTENT_TYPE: 'application/x-www-form-urlencoded; charset=UTF-8'
Jun 16 20:59:05 ubuntu reddit-paster: FULLPATH: '/api/del'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_ACCEPT: 'application/json, text/javascript, */*; q=0.01'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_ACCEPT_ENCODING: 'gzip'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.9'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CDN_LOOP: 'cloudflare'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CF_CONNECTING_IP: 'REDACT'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CF_IPCOUNTRY: 'CA'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CF_RAY: '4e7fb49c09f0cac4-YYZ'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CF_VISITOR: '{"scheme":"https"}'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_CONNECTION: 'close'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_COOKIE: '__cfduid=dc10589a59bd5a358c84a14d03793c0871542267523; loid=pn8s5E8cP7fgimcVBh; loidcreated=2018-11-15T07%3A38%3A44.124Z; saidit_session=3104%2C2019-03-18T23%3A19%3A11%2C0d0d8c20cebc87b62969cf059c549e8e553f1d4d; secure_session=1; reddit_mobility=m; pc=sg; JasonCarswell_recentclicks2=t5_qze%2Ct5_ocm%2Ct5_i4o%2Ct5_epb%2Ct5_dyg; io=9aijVvR-U_3xKMKmADiJ'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_DNT: '1'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_HOST: 'saidit.net'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_ORIGIN: 'https://saidit.net'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_REFERER: 'https://saidit.net/s/Freedom/comments/qzh/in_a_obsolete_state_logic_is_an_enemy_truth_is_a/'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_USER_AGENT: 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.38 Safari/537.36'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_X_FORWARDED_FOR: '108.162.241.11'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_X_FORWARDED_PROTO: 'https'
Jun 16 20:59:05 ubuntu reddit-paster: HTTP_X_REQUESTED_WITH: 'XMLHttpRequest'
Jun 16 20:59:05 ubuntu reddit-paster: PATH_INFO: '/api/del'
Jun 16 20:59:05 ubuntu reddit-paster: REDDIT_NAME: 'REDACT'
Jun 16 20:59:05 ubuntu reddit-paster: REMOTE_ADDR: '127.0.0.1'
Jun 16 20:59:05 ubuntu reddit-paster: REQUEST_METHOD: 'POST'
Jun 16 20:59:05 ubuntu reddit-paster: SERVER_NAME: '0.0.0.0'
Jun 16 20:59:05 ubuntu reddit-paster: SERVER_PORT: '8001'
Jun 16 20:59:05 ubuntu reddit-paster: SERVER_PROTOCOL: 'HTTP/1.1'
Whenever I try to use the API, I get an error saying:
Access to XMLHttpRequest at 'https://saidit.net/api/login/Yhvr' from origin '<local server>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I'm thinking that you might need to disable Access-Control-Allow-Origin
. Maybe not, I barely understand this HTTP stuff.
After installation, an error appears:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
On your server accepts this encoding. I wonder where to dig?
"X subreddits" https://saidit.net/me/m/allmusic
"a multireddit for X minutes" https://saidit.net/me/m/allmusic
"Add subreddit" https://saidit.net/me/m/allmusic
"PUBLIC MULTIREDDITS" https://saidit.net/user/d3rr
As the site's code isn't a secret, I can't think of any issue with providing tracebacks and such on the site proper. This does not mean that there isn't an issue with doing so.
This is a proposal for improving the "this broke" error page to display debug information (where possible) in addition to a funny picture, which will expedite the fixing of bugs.
Major components of task:
This is tricky with the current code. If the elements were being created using ordinary DOM commands, it would be simple:
var a = thingy can't remember this
var img = document.createElement("img");
img.src = a.href;
if (a.title) img.title = a.title;
thingy can't remember.appendChild(img);
As the jQuery directly inserts HTML, though, this is slightly more tricky. Which approach should be taken?
Having the "allow this sub to be included in /s/all as well as the default and trending lists" checkbox in sub settings unticked makes the sub not appear in /subs/mine/moderator.
The Slide client uses this endpoint (specifically https://oauth.saidit.net/subs/mine/moderator.json?limit=100) to determine whether to show moderation actions on posts and comments, and they never showed up for /s/WatchPeopleDie, where this option was turned off. Turning it on makes everything work as expected.
Title. This basically breaks right-click.
Also, while you're at it, adding touch
events would also be good.
Post search:
Sub search:
Seems to happen when there are no or very few relevant subreddits to return
https://saidit.net/s/SaidIt/comments/9om/i_dont_understand_why_nonsub_items_ie_original/
Rather than joining the private sub name as a chat channel, join its md5 or sha1 name checksum. Should be an easy fix.
Aka the server side equivalent of this PR: #20 which added html5 audio and video support for about 14 filetypes.
Related: need proper server side svg and gif support
I don't know of the boundaries to this, but jQuery 2.11 is pretty old. Can we get a new one?
It'll help with development, for those of us who use jQuery, because newer is faster.
Someone with a browser setting to open new tabs is seeing 'JPG' click open a new tab. Event.preventdefault() in toggleMdExpando() should fix
The href is "JavaScript: null" but I guess that's not enough.
Is it running? Lacks configuration?
Basically port the RES implementation of image resizing. The resizer that exists now can only expand the image to the parent container's width.
This is in reference to the Ask Saidit Thread (I am 0eye)
Link to the banner/icons used in the demo
/*
This code inherents the license from the SaidIt project
https://github.com/libertysoft3/saidit/blob/master/LICENSE
Author: 0eye
*/
#header, .footer-banner{
background-image:url('http://138.68.219.81/img/saidit/banner.jpg');
background-attachment:fixed;
background-size:cover;
background-position:center;
}
.footer-banner{
background-position:center bottom;
min-height:0;
height:5px;
}
#header-img.default-header{
height:15rem;
background-position:98% 10%;
background-size:200px;
}
.arrow.up{
background-image: url('http://138.68.219.81/img/saidit/light.png');
}
.arrow.upmod{
background-image: url('http://138.68.219.81/img/saidit/light-set.png');
}
.arrow.down{
background-image: url('http://138.68.219.81/img/saidit/fun-alt.png');
}
.arrow.downmod{
background-image: url('http://138.68.219.81/img/saidit/fun-set-alt.png');
}
.thing .title:visited, .thing.visited .title {
color:#ff7500;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #999999;
}
::-webkit-scrollbar-thumb {
background: #5A90C5;
}
::-webkit-scrollbar-thumb:hover {
background: #ef842d;
}
At this point I think I'm looking for more feedback from the dev team on the above points. I'm willing to try the PR myself but I don't have any knowledge of the back-end code. How hard is it to set up a development environment? From what I've heard its a PITA.
Revert the newer Reddit behavior and go back to returning real ups and downs. RedReader has so far sidesteped this by only displaying score.
See also: https://saidit.net/s/SaidIt/wiki/dev/app-development-guide
This is the first time I've seen this happening.
Demonstration: https://files.therealfarfetchd.dev/f/394658c0adb64913a218/
See the pyramid image in the sidebar expando here: https://saidit.net/s/WatchPeopleDie/
Need to add a style like: .side .md-expando-button image max width 100%.
Review the last commits that regressed it.
When I install on AWS and try to access via public IP the browser translates the IP to
And obviosly cannot open that website because there is no such domain.
How can I fix this>?
I was trying to identify the REDDIT_DOMAIN and change value but with no luck.
Any help?
Night mode unreadable: https://saidit.net/dev/api
E.g. https://saidit.net/domain/youtu.be/
Also check other time based listings for domains like top last 24h.
As reported this fails: https://saidit.net/s/SaidIt/search?q=vote&sort=top&restrict_sr=on
Edit: also broken:
Works:
Any idea how to get Embed.ly to work?
Reported on numerous occasions. Maybe other adblockers too. Switch up our CSS classes or whatever until it stops messing up and confusing users.
Either remove the API usage guidelines, or fix the 404.
preferences -> apps -> are you a developer? create an app... -> read the API usage guidelines
I wasn't notified of https://saidit.net/s/SaidIt/comments/kbk/saiditnet_april_17_2019_html5_expandos_now/, Even though my username was mentioned in the post. It would be nice if that was a thing.
For both client and server side expandos. E..g https://www.invidio.us/watch?v=7BEVLD6YHsc
Maybe I'm crazy, and this is going too far. But I think we can get at least 5% of the stuff on this list to display on Saidit.
However, for full compatibility, many of these each need their own hacks. PDF should be an <embed>
tag in an <object> tag _or_ an
<iframe>`; maybe there's a JavaScript feature detection method for when to use each? We'll also need a MIME-type table, with fallbacks for different browsers (which support / mandate different MIME-types) – making sure the default "unknown" option is always the correct, canonical, official MIME-type to ensure maximum future-compatibility.
My head hurts just thinking about the logistics of this. I think we just need:
Sound good?
Fix it or stop making the request
Related: sub traffic stats and #44
Some RabbitMQ messages are not being processed! After ~2 years in production, some serious memory is being wasted on:
$ sudo rabbitmqctl list_queues
cloudsearch_changes 244741
event_collector 9388043
Event collector messages are likely the sub traffic stats/reddit pixel data that has never worked...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.