Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf gen should be executed automatically #25

Closed
infalmo opened this issue Aug 2, 2019 · 5 comments
Closed

cf gen should be executed automatically #25

infalmo opened this issue Aug 2, 2019 · 5 comments

Comments

@infalmo
Copy link

infalmo commented Aug 2, 2019

cf gen and cf parse should go hand in hand, atleast while parsing individual problems.
Running cf parse should also run cf gen in the respective directories.

@xalanq
Copy link
Owner

xalanq commented Aug 2, 2019

It's good while parsing single problem. I'll consider your thought.
It's bad while parsing a contest. Because there is a timestamp in each code.

@GaurangTandon
Copy link
Contributor

@xalanq Can you please tell what you mean by "there is a timestamp in each code"?

@xalanq
Copy link
Owner

xalanq commented Aug 5, 2019

@GaurangTandon OK, that's should be "there could be a timestamp in each code".

Somebody may want to record the starting time of each problem, so he/she can put the timestamp in the code.

In usage:

Template:
  You can insert some placeholders into your template code. When generate a code from the
  template, cf will replace all placeholders by following rules:

  $%U%$   Username
  $%Y%$   Year   (e.g. 2019)
  $%M%$   Month  (e.g. 04)
  $%D%$   Day    (e.g. 09)
  $%h%$   Hour   (e.g. 08)
  $%m%$   Minute (e.g. 05)
  $%s%$   Second (e.g. 00)

and a template:

/* Generated by powerful Codeforces Tool
 * You can download the binary file in here https://github.com/xalanq/cf-tool (win, osx, linux)
 * Author: $%U%$
 * Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$
**/

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    return 0;
}

If the user run cf gen, then the code will contain the starting time.

@GaurangTandon
Copy link
Contributor

I understand, however, not all of us insert timestamps into our code. I think if you could add an extra option to "autorun cf gen while doing cf parse", it would be very useful for several of us.

@xalanq
Copy link
Owner

xalanq commented Aug 8, 2019

I understand, however, not all of us insert timestamps into our code. I think if you could add an extra option to "autorun cf gen while doing cf parse", it would be very useful for several of us.

Good idea!

@xalanq xalanq closed this as completed in 0b8945e Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants