download overleaf project source via script - tex

How can I download the source of an overleaf project with a command line script? I want to make regular backups of the source and it'd be better if I could automate the download instead of having to do it through the web interface every time. I'm not aware of any API that would allow me to do that, is there any?
I know that an ideal solution would probably use git-overleaf integration for proper version control and that's what I do for my personal projects, but for some projects I have to work with collaborators who find git too confusing and do not want to enable the git features to avoid possible confusions between the git history and overleaf's history, so that's not an option.

You may want to look into scripts that download zip archive of your project, for example overleafv2-git-integration-unofficial
This python script will download zip of your project, extract it, and delete the zip. It offers basic git functionality albeit largely experimental.
Sample usage:
overleafv2-git --email=your#email --password=yourpass --message="commit message" project-URL

Related

TFS - Versioning file in a drop folder

We currently use TFS 2010 for controlling some of our .NET projects.
I'd like to know whether it's possible to provide some kind of versioning within TFS for a specific folder on a network share for example.
The idea being is to control release packages (zips) for every release we do. As this bit is done by some other person (not technical and he doesn't use Visual Studio or any tech tool), it'd be great to streamline the process of versioning the zip files for every release.
Technically speaking:
We've setup this folder \servername\releasezips and every time I drop a file named release.zip, it would automatically commit (push) this file to the TFS server (no comments needed) and furthermore, once the file contents change (meaning that someone dropped another version of the file in there), the system would again push the file to TFS, but with a following version.
Is this possible somehow? I've seen somewhere that I could programatically have some extra control over TFS, using REST API.
Thanks in advance!
Thanks for your tips, Daniel and PatrickLu-MSFT.
As I said, I did want something straighforward, some kind of control similar to what box.com provides, where you associate a local folder on your machine with the cloud. So, once you drop files in the local folder, the small box client synchronizes it along with the cloud. If access the box.com, I can see the different versions of that specific file.
So what I did was, I've created a small .NET app to monitor the folder and any new files dropped in there would get checked in to our TFS server, by using the tf command line (of course ignoring work items or comments).
So, progamatically within the .NET app, it builds up the tf required commands for processing and versioning the recently dropped files and therefore, executes them.
By the way, I could have used the Team Foundation API in order to do the same job, but it would demand way more effort.
Cheers
According to your description, you want to commit/check in files during the build/release pipeline.
It's not a recommend way to check-in generated build files and modify source code during a build pipeline. If you really want to do this, you could edit the build workspace files and use tf commands in custom activity and call the powershell eq:
cd $env:BUILD_SOURCESDIRECTORY
$TFFile = Get-Item "C:\Program Files (x86)\Microsoft Visual Studio 1x.0\Common7\IDE\TF.exe"
$tfOutput = [string]( & $TFFile.FullName checkin /noprompt /override:"***NO_CI*** New version is $newVersion." /comment:"***NO_CI*** New version is $newVersion." 2>&1)
Another way is installing TFS Power Tool and use the Windows PowerShell Cmdlets to check in the files. Refer to this link for more details: PowerShell and TFS: The Basics and Beyond
For version the dropped files, you could take a look this similar question: TFS Build Copy to Versioned Folder
Basically, you have to customize build definition with custom activity and based on build.buildnumber variable to generate/create .zip file.

Creating an app as a Team so both parties can edit code

My friend and I are creating an app and we are wondering if there is a way where we can both edit the code at the same time?
Don't use SVN. You will see how easy version control could be and later everywhere on the job people will use Git because it is "better" and you will get frustrated.
Just use Git from the beginning, stay happy, you will love it. Really! 😏
The default in Xcode is Git too, so it can't be wrong.
Just be aware that the interface in Xcode is offering you a filtered version of the Git commands. As soon as you really need it for anything you will end up on the command line.
Whatever you try there, the first few times it will fail until you have learned the propper syntax and all side effects. So just make a copy of the folder, or zip or tar it before you try it a simple git command.
Also SourceTree is nice, but same problem there, learn what every command really does.
Use git! Lets people edit code and track the progress of the project (among many other useful tools).
Git Tutorial
If you are looking for more of a 'Google Docs' atmosphere, I would look into Codr or Cloud9
You can use SourceTree a free git repository handler.

OpenSource my application

I am developing the following application and I'm thinking of making it opensource (add it to Github).
http://actibities-uniongr.rhcloud.com/pages/view-demo
In my local environment I have scripts loading temporary data for development purposes. Should that be included in the code pushed to Github?
In general, you should:
Include
Source code (duh)
Scripts related to the building, packaging, and/or releasing of the software
Documentation, explaining how to use those scripts
License (important!)
Not include
Sensitive data, including private keys and passwords (remove these before you initially commit or they can still be accessed). To remove data from an existing repository you should try git's filter-branch command.
Proprietary code (duh)
Large binary files, including:
Prebuilt toolchain (this should be present in the environment)
Large binary data that can be recreated easily using build scripts
Library source trees -- make these either a requirement for building, or use a Git submodule to include them.
As for the initial commit and upload, GitHub themselves have a pretty good tutorial.
I applaud your decision to open-source the project. Good luck!

Where can I get large sample TFS repositories?

I'm building a tool to integrate with TFS and it needs to properly parse TFS logs (from the tf.exe history command) and checkout different revisions (again using tf.exe). It works great on the test TFS server I have, but I want to test it on a broad range of large repositories to make sure my parsing works properly.
I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member.
Are there any collections of open source code hosted on public TFS servers? Are there any other publicly available servers I could use for testing?
I would suggest using svn2tfs and choose any relatively active project on SourceForge. There are plenty of projects on SF to choose from that use SVN and not CVS. You might even get a bonus out of it and help the svn2tfs project work out any kinks.
Since you mention tf history command, I assume you want to collect/parse logs on the project's (and its files) history of checkins.
So in addition to large repository, you also need a good amount of history, am I right? If yes, then here's your set of problems:
Most projects on codeplex use Mercurial, not TFS. So even if you get access, you cannot use TFS with them.
As you mentioned, they require you to a be a member for you to access the source.
Even if you get access or find a public server (unlikely), you still would need good amount of history.
If I'm correct in my assumptions so far, here's the easiest (bit tedious though) way out:
Go to any large projects's such as Nuget or Wix
revisions
Download any old revision (go back as far as you want the history for). You can download zipped src files without being a member.
In your test server, checkin the code (src) to create the baseline.
Download the next revision.
Checkout files in your server and overwrite them with the newer revision's files.
While checkin, use the history.txt (sample) to create checkin comments
Repeat this process few times.
Voila!! You now have a large repository with lot of history!
Hope this helps.
Have you tried some of the larger projects on Codeplex?
http://www.codeplex.com
If you only need read access you should be able to play around with the various repositories.
I don't have a huge amount of tfs experience, but I would assume there are migration tools that let you ingest code repositories from other products (e.g svn or hit).
If so, you might want to find a svn/git repo for a sizable foss project, and try importing that.
"I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member."
This solution appears to be the general consensus amoung SO'rs. I've read some of the Codeplex TFS connection problem threads (you linked to below) and I hope the comments in this thread resolves the issue:
Connecting to Codeplex TFS as a Coordinator or Developer.
I'm wondering if you can use git-tfs project to import an existing Git project into TFS.
Download and install git-tfs
Create a new TFS project
Clone the TFS project to a Git project using git-tfs ("git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project")
Import a existing Git project of your choice into your fresh new Git project (I don't know the command but I think it's possible).
Use git-tfs to checkin to TFS Server ("git tfs checkintool")
=> Do it makes sense ? And works ?
For more information:
http://lostechies.com/jimmybogard/2011/09/20/git-workflows-with-git-tfs/

Tools for Ruby on Rails projects in Perforce

we are using Perforce for source configuration management and I have just started to hack some small stuff in Ruby on Rails. As Perforce follows the "check-out before modify" paradigm, and RoR expects to have all files writable for the various script/ stuff, do you know/use any helpers to make RoR work together with Perforce? I know I could just open all files for edit all the time, but is there something more elegant?
Thanks,
Henrik
"Check-out-before-edit" is Perforce's dominant paradigm, but not the only way to use it. Perforce has a good article on Working Disconnected, which sounds closer to your needs:
Set up your Perforce workspace with the "allwrite" option
Allow RoR to make any changes to any files it wants
Update the server's view of your workspace by marking the files you added, deleted, and modified. You can use "Reconcile offline work" in p4v, or run several shell commands suggested in the "Working Disconnected" article.
I use git for local RoR development, then git-p4 to synchronize with the Perforce server. My workarea files stay writable, I get all the benefits of git, and I stay in sync with others on my team who use Perforce.
Not sure what you are asking: do want do check-out your files before you compile in your IDE -or- do you want to do perforce actions in a RoR application?
If it is the latter, try P4Ruby:
http://public.perforce.com/guest/tony_smith/perforce/API/Ruby/main/doc/
The other requires IDE support, which is possible, however I cannot advise further unless you say which one you are using (Visual Studio, CodeGear, Notepad?).
HTH,

Resources